package feng.demo.dao;

import feng.demo.entity.Largefile;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LargefileDao {
//    @Insert(value = "insert into t_largefile "
//            + "(filename,content) "
//            + "values(#{filename},"
//            + " #{content, javaType=byte[], jdbcType=BLOB, " +
//            "typeHandler=org.apache.ibatis.type.BlobTypeHandler})"+
//            "SELECT LAST_INSERT_ID()")
    public Integer add(Largefile largefile);

    @Select(value = "select id,filename,content from t_largefile where id=#{id}")
    public Largefile findOne(Integer id);


    @Delete(value = "delete from t_largefile where id=#{id}")
    void delete(Integer id);

}
